package com.homedo.odin.solution.controller.wap;


import com.homedo.core.common.base.controller.BaseController;
import com.homedo.core.common.base.dto.ResultData;
import com.homedo.odin.solution.contract.wap.BrandFirmAPPDetailResp;
import com.homedo.odin.solution.service.bizservice.pc.UserInfoService;
import com.homedo.odin.solution.service.bizservice.wap.WapBrandFirmBizService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@Api(description = "PC 用户信息", tags = {"UserInfo"}, produces = MediaType.APPLICATION_JSON_VALUE)
@RestController
@RequestMapping("/wap/user_info")
public class WapUserInfoController extends BaseController<UserInfoService> {

    @Autowired
    private WapBrandFirmBizService brandFirmBizService;

    @ApiOperation(value = "M站_获取品牌商详情", notes = "M站_获取品牌商详情", response = BrandFirmAPPDetailResp.class, httpMethod = "GET")
    @GetMapping("/brand_firms/{userId}")
    public ResultData getBrandFirmDetail(
            @ApiParam(value = "品牌主id", required = true) @PathVariable("userId") Integer userId) {
        return ResultData.newInstance(brandFirmBizService.getBrandFirmDetail(userId));
    }
}
